#pragma once

#include "XamlSchemaContext.h"
class XamlBinaryMetadataReader
{
private: 
	XamlBinaryMetadataReader(const xshared_ptr<XamlSchemaContext> & spXamlSchemaContext, struct IPALStream * pMetadataStream);
	HRESULT LoadStringTable();
	HRESULT LoadAssemblyList();
	HRESULT LoadTypeNamespaceList();
	HRESULT LoadTypeList();
	HRESULT LoadPropertyList();
	HRESULT LoadXmlNamespaceList();
public: 
	HRESULT LoadMetadata();
	static HRESULT Create(const xshared_ptr<XamlSchemaContext> & spXamlSchemaContext, struct IPALStream * pMetadataStream, xshared_ptr<XamlBinaryMetadataReader> & spXamlBinaryMetadataReader);
	virtual ~XamlBinaryMetadataReader();
	xvector<xshared_ptr<XamlAssembly> > m_vecMasterAssemblyList;
	xvector<xshared_ptr<XamlTypeNamespace> > m_vecMasterTypeNamespaceList;
	xvector<xshared_ptr<XamlType> > m_vecMasterTypeList;
	xvector<xshared_ptr<XamlProperty> > m_vecMasterPropertyList;
	xvector<xshared_ptr<XamlNamespace> > m_vecMasterXmlNamespaceList; 
	xvector<xshared_ptr<CXString> > m_vecStringTable;
private: 
	xref_ptr<IPALStream> m_spMetadataStream; 
	xshared_ptr<XamlSchemaContext> m_spXamlSchemaContext; 

};